﻿<%@ Page Title="Xem tat ca loi binh" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="XemTatCaLoiBinh.aspx.cs" Inherits="LayoutTemplate.XemTatCaLoiBinh" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<style type="text/css">
.newStyle1 
{
	float:left;
	width: 120px;
	height: 50px;
}
.newStyle2 {
	float: left;
	width: 580px;
	height: 100px;
}
</style>

 <%   int id = int.Parse(Request.QueryString["id"]);
    System.Collections.Generic.List<DAO_DTO_WS.DTO.ThanhVienDTO> dsThanhVien = new System.Collections.Generic.List<DAO_DTO_WS.DTO.ThanhVienDTO>() ;
    dsThanhVien = DAO_DTO_WS.DAO.ThanhVienDAO.LayDSThanhVien();
    System.Collections.Generic.List<DAO_DTO_WS.DTO.LoiBinhDTO> dsLoiBinh = DAO_DTO_WS.DAO.LoiBinhDAO.LayCommentTheoSp(id);
    int lbcount = dsLoiBinh.Count;
    if (lbcount == 0)
       {
          Response.Write("<p>Khong co loi binh</p>");
       }
    int tvcount = dsThanhVien.Count;
    for (int i = lbcount-1; i >= 0; --i)
       {
          for (int j = 0; j < tvcount; ++j)
             {
                 if (dsLoiBinh[i].MaThanhVien == dsThanhVien[j].MaThanhVien)
                 {
                     %>
                     <div>
                     <%
                        Response.Write("<div class=\"newStyle1\">" + dsThanhVien[j].TenThanhVien + "</div>"
                              + "<div class=\"newStyle2\">" + dsLoiBinh[i].NoiDung + "</div>");
                     %>
                     </div>
                      <%
                  }
             }
       }
     %>
</asp:Content>
